import {pget, ppostJson} from '@/utils/req'
import {modalApi} from '@/utils/modalReq'

/** 获取供应商档案列表 */
export function getSupplierArchivesList(query?: any) {
	return pget(`${modalApi.supplier}/supplier/currency/list`, query)
}

/** 发起供应商状态修改 */
export function editSupplierArchives(data: any) {
	return ppostJson(
		`${modalApi.supplier}/supplier/currency/startArchivesProcess`,
		data,
	)
}
/** 修改供应商档案启用状态 */
export function checkStatus(data: any) {
	return ppostJson(`${modalApi.supplier}/supplier/currency/checkStatus`, data)
}

/** 查看供应商档案详情 */
export function supplierArchivesInfo(id: string) {
	return pget(`${modalApi.supplier}/supplier/currency/detail/${id}`)
}

/** 获取供应商采购列表 */
export function getSelectPurchaseList(query?: any) {
	return pget(
		`${modalApi.supplier}/supplier/currency/selectPurchasePage`,
		query,
	)
}

/** 获取供应商合同列表 */
export function getSelectContractList(query?: any) {
	return pget(
		`${modalApi.supplier}/supplier/currency/selectContractPage`,
		query,
	)
}

/** 获取供应商结算列表 */
export function getSelectApplyPayPage(query?: any) {
	return pget(
		`${modalApi.supplier}/supplier/currency/selectApplyPayPage`,
		query,
	)
}
/** 查询最新禁用、启用原因 */
export function getDisableData(query?: any) {
	return pget(`${modalApi.supplier}/supplier/currency/getDisableData`, query)
}
